package www.lagou.entity;

import java.util.Date;

/**
 * id INT PRIMARY KEY AUTO_INCREMENT ,
 * NAME VARCHAR (30),  -- 员工姓名
 * age DOUBLE ,    -- 员工年龄
 * sex VARCHAR (6),   -- 员工性别
 * salary DOUBLE ,   -- 薪水
 * empdate DATE ,   -- 入职日期
 * did INT,    -- 所属部门ID
 */
public class Employee {

    private int eid;    //id
    private String name;    //员工姓名
    private double age; //员工年龄
    private String sex; //员工性别
    private double salary;  //薪水
    private Date empdate;   //入职日期
    private int did;    //所属部门ID

    private Dept dept;  //部门类

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "eid=" + eid +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", salary=" + salary +
                ", empdate=" + empdate +
                ", did=" + did +
                ", dept=" + dept +
                '}';
    }

    public int getEid() {
        return eid;
    }

    public void setEid(int eid) {
        this.eid = eid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getAge() {
        return age;
    }

    public void setAge(double age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Date getEmpdate() {
        return empdate;
    }

    public void setEmpdate(Date empdate) {
        this.empdate = empdate;
    }

    public int getDid() {
        return did;
    }

    public void setDid(int did) {
        this.did = did;
    }
}
